<template>
  <div class="app-container">
    <!-- 主页面 -->
    <el-row :gutter="20">
      <!-- BOM树 -->
      <el-col :lg="4" :xs="24">
        <el-card>
          <el-scrollbar style="height: 1000px; width: 100%">
            <el-tree
              v-loading="treeLoading"
              ref="BOMTreeRef"
              class="mt-2"
              :data="BOMOptions"
              :props="{ children: 'children', label: 'CodeName', disabled: '' }"
              :expand-on-click-node="false"
              :filter-node-method="handleFilter"
              default-expand-all
              @node-click="handleNodeClick"
            />
          </el-scrollbar>
        </el-card>
      </el-col>
      <!-- 表单 -->
      <el-col :lg="20" :xs="24">
        <!-- 查询模块 -->
        <div class="search-container">
          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
            <el-form-item label="物料编码" prop="code">
              <el-input
                v-model="queryParams.code"
                placeholder="物料编码"
                clearable
                style="width: 200px"
                @keyup.enter="handleQuery"
              />
            </el-form-item>
            <el-form-item label="组织名称" prop="org">
              <dictionary
                style="width: 100px"
                v-model="queryParams.org"
                type-code="orgId"
              />
            </el-form-item>
            <el-form-item label="状态" prop="org">
              <dictionary
                style="width: 100px"
                v-model="queryParams.remark"
                type-code="BOMItemStatus"
              />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="handleQuery"
                ><i-ep-search />搜索</el-button
              >
            </el-form-item>
            <el-form-item>
              <el-button @click="handleReset"> 重置 </el-button>
            </el-form-item>
            <el-form-item>
              <el-button @click="handleIFAErr"> 材料定额 </el-button>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="openConfigDialog('cost-form')">
                设置
              </el-button>
            </el-form-item>
            <el-form-item>
              <el-button @click="handleAllBudget"> 全面预算 </el-button>
            </el-form-item>
          </el-form>
        </div>
        <!-- 表单 -->
        <el-card shadow="never" class="table-container">
          <div style="float: right">
            用工时长：{{ totalRunLaborHours.toFixed(2) - 0 }}&nbsp;&nbsp;&nbsp;
            采购费用：{{ totalPrice.toFixed(2) - 0 }}
          </div>
          <el-button
            type="success"
            style="float: left"
            @click="openDialog('cost-form')"
            >详情</el-button
          >
          <el-table
            :data="PageResult"
            @row-click="handleRowClick"
            v-loading="tableLoading"
          >
            <el-table-column label="序号" width="50px" align="center">
              <template #default="scope">
                {{ scope.$index + 1 }}
              </template>
            </el-table-column>
            <el-table-column
              width="50px"
              label="层级"
              align="center"
              prop="ExpandLevel"
            />
            <el-table-column label="物料编号" align="center" prop="Code" />
            <el-table-column label="物料名称" align="center" prop="name" />
            <el-table-column label="规格" align="center" prop="SPECS" />
            <el-table-column label="实际用量" align="center" prop="UsageQty" />
            <el-table-column label="类型" align="center" prop="IFA" />
            <el-table-column label="BOM属性" align="center" prop="IFAMsg" />
            <el-table-column
              label="供应商"
              align="center"
              prop="SupplierCode"
            />
            <el-table-column label="价格" align="center" prop="price">
              <template #default="scope">
                <div v-if="scope.row.disable && scope.row.IFA === '采购件'">
                  <el-input
                    v-model="scope.row.price"
                    type="number"
                    size="small"
                  />
                </div>
                <div v-else>
                  {{ scope.row.price }}
                </div>
              </template>
            </el-table-column>
            <el-table-column label="工时" align="center" prop="RunLaborHours">
              <template #default="scope">
                <div v-if="scope.row.disable && scope.row.IFA === '制造件'">
                  <el-input
                    v-model="scope.row.RunLaborHours"
                    type="number"
                    size="small"
                  />
                </div>
                <div v-else>
                  {{ scope.row.RunLaborHours }}
                </div>
              </template>
            </el-table-column>
          </el-table>

          <pagination
            v-model:total="total"
            v-model:page="queryParams.pageNum"
            v-model:limit="queryParams.pageSize"
            @pagination="handlePage"
          />
        </el-card>
      </el-col>
    </el-row>
    <!-- 详情设置 -->
    <el-dialog
      v-model="dialog.visible"
      :title="dialog.title"
      :width="dialog.width"
      append-to-body
      @close="closeDialog"
    >
      <!-- 计算参数设置 -->
      <el-form
        ref="costFormRef"
        :model="formData"
        :rules="rules"
        label-width="100px"
        :inline="true"
      >
        <el-form-item label="其他材料费用" prop="otherFees">
          <el-input
            type="number"
            v-model="formData.otherFees"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="工人时薪" prop="salary">
          <el-input
            type="number"
            v-model="formData.salary"
            placeholder="元/小时"
          />
        </el-form-item>
        <el-form-item label="电费费率" prop="electricityCostP">
          <el-input
            type="number"
            v-model="formData.electricityCostP"
            placeholder="元"
          />
        </el-form-item>
        <el-form-item label="采购保险费率" prop="PurchasedMaterialPremiumP">
          <el-input
            type="number"
            v-model="formData.PurchasedMaterialPremiumP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="制造费率" prop="ManufacturingCostP">
          <el-input
            type="number"
            v-model="formData.ManufacturingCostP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="财务利率" prop="InterestP">
          <el-input
            type="number"
            v-model="formData.InterestP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="管理费率" prop="ManageCostP">
          <el-input
            type="number"
            v-model="formData.ManageCostP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="产值估算率" prop="InterestP">
          <el-input
            type="number"
            v-model="formData.OutputP"
            placeholder="小数"
          />
        </el-form-item>
      </el-form>
      <el-divider />
      <el-form :inline="false">
        <el-form-item>
          人工工资：{{
            (formData.totalSalary =
              (totalRunLaborHours * formData.salary).toFixed(2) - 0)
          }}
        </el-form-item>
        <el-form-item>
          机械部分总成本：{{
            (formData.TotalMechanicalCost =
              (
                (totalPrice + Number(formData.otherFees)) *
                (1 + formData.PurchasedMaterialPremiumP)
              ).toFixed(2) - 0)
          }}, 外购材料：{{
            (formData.PurchasedMaterialCost = totalPrice.toFixed(2) - 0)
          }}, 外购材保费：{{
            (formData.PurchasedMaterialPremium =
              (
                (totalPrice + Number(formData.otherFees)) *
                formData.PurchasedMaterialPremiumP
              ).toFixed(2) - 0)
          }}
        </el-form-item>
        <el-form-item>
          制造费用：{{
            (formData.ManufacturingCost =
              (
                formData.ManufacturingCostP *
                (((totalPrice + Number(formData.otherFees)) *
                  (1 + formData.PurchasedMaterialPremiumP)) /
                  formData.OutputP)
              ).toFixed(2) - 0)
          }}
        </el-form-item>
        <el-form-item>
          电费：{{
            (formData.electricityCost =
              (
                formData.electricityCostP *
                (((totalPrice + Number(formData.otherFees)) *
                  (1 + formData.PurchasedMaterialPremiumP)) /
                  formData.OutputP)
              ).toFixed(2) - 0)
          }}
        </el-form-item>
        <el-form-item>
          财务利息：{{
            (formData.interest =
              (
                formData.InterestP *
                (((totalPrice + Number(formData.otherFees)) *
                  (1 + formData.PurchasedMaterialPremiumP)) /
                  formData.OutputP)
              ).toFixed(2) - 0)
          }}
        </el-form-item>
        <el-form-item>
          管理费用：{{
            (formData.ManageCost =
              (
                formData.ManageCostP *
                (((totalPrice + Number(formData.otherFees)) *
                  (1 + formData.PurchasedMaterialPremiumP)) /
                  formData.OutputP)
              ).toFixed(2) - 0)
          }}
        </el-form-item>
        <el-form-item>
          合计：{{
            (formData.totalPrice =
              (
                formData.totalSalary +
                formData.TotalMechanicalCost +
                formData.interest +
                formData.ManufacturingCost +
                Number(formData.electricityCost)
              ).toFixed(2) - 0)
          }}
        </el-form-item>
      </el-form>
      <!-- 弹窗底部操作按钮 -->
      <template #footer>
        <div class="dialog-footer">
          <el-button type="success" @click="handleExcel">导出</el-button>
          <el-button type="primary" @click="handleAddCache">存档</el-button>
          <el-button @click="closeDialog">取 消</el-button>
        </div>
      </template>
    </el-dialog>
    <!-- 默认设置 -->
    <el-dialog
      v-model="configDialog.visible"
      :title="configDialog.title"
      :width="configDialog.width"
      append-to-body
      @close="closeConfigDialog"
    >
      <!-- 计算参数设置 -->
      <el-form
        ref="costFormRef"
        :model="configData"
        label-width="100px"
        :inline="true"
      >
        <el-form-item label="其他材料费用" prop="otherFees">
          <el-input
            type="number"
            v-model="configData.otherFees"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="工人时薪" prop="salary">
          <el-input
            type="number"
            v-model="configData.salary"
            placeholder="元/小时"
          />
        </el-form-item>
        <el-form-item label="电费费率" prop="electricityCostP">
          <el-input
            type="number"
            v-model="configData.electricityCostP"
            placeholder="元"
          />
        </el-form-item>
        <el-form-item label="采购保险费率" prop="PurchasedMaterialPremiumP">
          <el-input
            type="number"
            v-model="configData.PurchasedMaterialPremiumP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="制造费率" prop="ManufacturingCostP">
          <el-input
            type="number"
            v-model="configData.ManufacturingCostP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="财务利率" prop="InterestP">
          <el-input
            type="number"
            v-model="configData.InterestP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="产值估算率" prop="InterestP">
          <el-input
            type="number"
            v-model="configData.OutputP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="管理费率" prop="ManageCostP">
          <el-input
            type="number"
            v-model="formData.ManageCostP"
            placeholder="小数"
          />
        </el-form-item>
        <el-form-item label="过滤信息">
          <el-button
            type="primary"
            link
            size="small"
            @click.stop="openDictDialog('Supplier', '成本预测不取价供应商')"
            ><i-ep-Collection />供应商过滤</el-button
          >
          <el-button
            type="primary"
            link
            size="small"
            @click.stop="openDictDialog('BOMMustPrice', '成本预测取价物料')"
            ><i-ep-Collection />取价物料</el-button
          >
          <el-button
            type="primary"
            link
            size="small"
            @click.stop="openDictDialog('BOMPresetPrice', '成本预测预设价格')"
            ><i-ep-Collection />预设价格</el-button
          >
          <el-button
            type="primary"
            link
            size="small"
            @click.stop="openDictDialog('BOMRunLaborHours', '成本预测工时维护')"
            ><i-ep-Collection />预设工时</el-button
          >
          <el-button
            type="primary"
            link
            size="small"
            @click.stop="openDictDialog('BOMItemMasterType', '料品属性维护')"
            ><i-ep-Collection />料品属性</el-button
          >
        </el-form-item>
      </el-form>
      <!-- 弹窗底部操作按钮 -->
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="handleConfigSubmit"
            >确 定</el-button
          >
          <el-button @click="closeConfigDialog">取 消</el-button>
        </div>
      </template>
    </el-dialog>
    <!--字典数据弹窗-->
    <el-dialog
      v-model="dictDataDialog.visible"
      :title="dictDataDialog.title"
      width="1000px"
      @close="closeDictDialog"
    >
      <dict-item
        v-model:typeCode="selectedDictType.typeCode"
        v-model:typeName="selectedDictType.typeName"
      />
    </el-dialog>
    <!--出错物料数据弹窗-->
    <IFAErr ref="IFAErrRef" />
    <!-- 全面预算页面弹窗 -->
    <AllBudget ref="AllBudgetRef" />
  </div>
</template>

<script setup lang="ts">
import {
  getBOMCalculate,
  getBOMTree,
  editBOM,
  updateConfig,
  getConfig,
  rmCache,
  addCache,
} from "@/api/forecast";
import { BOMCalResult, BOMOption, BOMQuery, BomVo } from "@/api/forecast/types";
import * as XLSX from "xlsx";
import IFAErr from "@/views/forecast/cost/components/IFAErr.vue";
import AllBudget from "@/views/forecast/cost/components/AllBudget.vue";

defineOptions({
  name: "Cost",
  inheritAttrs: false,
});
const queryFormRef = ref(ElForm); // 查询表单
const IFAErrRef = ref(IFAErr); // 材料定额错误内容
const AllBudgetRef = ref(AllBudget); // 全面预算
const BOMTreeRef = ref<InstanceType<typeof ElTree> | null>(null); // 部门树引用
const queryParams = reactive<BOMQuery>({
  code: "03.004.008.031",
  org: "1002211230000054",
  pageNum: 1,
  pageSize: 20,
});
const treeLoading = ref(false);
const tableLoading = ref(false);
const BOMOptions = ref<BOMOption[]>([]); // 树形表单
const CalResult = ref<BOMCalResult[]>([]); // 列表页
const PageResult = ref<BOMCalResult[]>([]); // 内存分页
const FilterResult = ref<BOMCalResult[]>([]); // 过滤分页
let totalPrice = ref<number>(0);
let totalRunLaborHours = ref<number>(0);
// let itemMaster = ref<string>("");
const total = ref(0); // 数据总数
const loading = ref(false); //  加载状态
const costFormRef = ref(ElForm); // 表单
const formData = reactive<BomVo>({
  itemMaster: "",
  Code: "",
  otherFees: 0.0, // 其他材料费用
  electricityCostP: 0.005, // 电费费率
  salary: 56.25, // 时薪
  PurchasedMaterialPremiumP: 0.025, // 采购保险费率
  ManufacturingCostP: 0.07, // 制造费率
  InterestP: 0.0, // 财务费率
  OutputP: 0.89, // 产值估算率
  ManageCostP: 0.05, // 管理费率
}); // 计算表单内容
const configData = reactive({
  otherFees: 0.0, // 其他材料费用
  electricityCostP: 0.005, // 电费费率
  salary: 56.25, // 时薪
  PurchasedMaterialPremiumP: 0.025, // 采购保险费率
  ManufacturingCostP: 0.07, // 制造费率
  InterestP: 0.0, // 财务费率
  OutputP: 0.89, // 产值估算率
  ManageCostP: 0.05, // 管理费率
});
const rules = reactive({}); // 表单判断

// 弹窗对象
const dialog = reactive({
  visible: false,
  type: "form",
  width: 800,
  title: "",
});
// 弹窗对象
const configDialog = reactive({
  visible: false,
  type: "form",
  width: 800,
  title: "",
});
// 弹窗对象
const editDialog = reactive({
  visible: false,
  type: "form",
  width: 800,
  title: "更新",
});

/** 左侧树、列表构建 **/
function handleQuery() {
  // if (queryParams.SupplierCode) {
  //   queryParams.SupplierCodeStr = queryParams.SupplierCode.map(
  //     (item) => `'${item}'`
  //   ).join(",");
  // }
  if (queryParams.code && queryParams.org) {
    queryTree(); // 左侧树
    calculate(queryParams); // 计算结果列表
  }
}

/** 列表查询 **/
function handlePage() {
  getTotal();
  // 内存过滤
  if (queryParams.remark) {
    let values = [];
    for (let value of CalResult.value) {
      if (value.remark == queryParams.remark) {
        values.push(value);
      }
    }
    FilterResult.value = values;
    total.value = FilterResult.value.length;
  } else {
    FilterResult.value = CalResult.value;
    total.value = CalResult.value.length;
  }
  // 内存分页
  if (queryParams.org)
    PageResult.value = FilterResult.value.slice(
      (queryParams.pageNum - 1) * queryParams.pageSize,
      queryParams.pageNum * queryParams.pageSize
    );
}

/** 更新BOM信息 **/
function handleUpsertCalRow(row: any) {
  editBOM({
    itemMaster: row.itemMaster,
    price: row.price,
    runLaborHours: row.RunLaborHours,
    startDate: row.startDate,
  });
  // verification(row);
  getTotal();
  row.disable = false;
}
/** 取消修改BOM信息 **/
function handleCancelCalRow(row: any) {
  row.disable = false;
  row.price = row._price;
  row.RunLaborHours = row._RunLaborHours;
  console.log(row._startDate);
  row.startDate = row._startDate;
}
/** 点击编辑 **/
function handleEditCalRow(row: any) {
  row.disable = true;
  row._startDate = row.startDate;
  row._price = row.price;
  row._RunLaborHours = row.RunLaborHours;
  row.startDate = new Date().toString();
}
/** 初始化 表单数据 CalResult **/
async function calculate(param: BOMQuery) {
  await getConfig("bomConfig");
  try {
    tableLoading.value = true;
    const response = await getBOMCalculate(param);
    CalResult.value = response.data;
    handlePage();
    tableLoading.value = false;
  } catch (error) {
    // 错误处理
    console.error("Failed to fetch BOM tree:", error);
  }
}

/** 内容校验 **/
function verification(value: any) {
  value["verification"] = true;
  value["remark"] = `通过`;
  if (value.IFA == "制造件" && value.IFAMsg !== "采购件子件") {
    value["price"] = null;
    if (value.RunLaborHours == null || value.RunLaborHours == 0) {
      value["verification"] = false;
      value["remark"] = `无工时`;
    }
  }
  if (value.IFA == "采购件" && value.IFAMsg !== "采购件子件") {
    value["RunLaborHours"] = null;
    if (value.price == null || value.price == 0) {
      value["verification"] = false;
      value["remark"] = `无价格`;
    }
  }
  if (value.IFA == "制造件" && value.nodeType == "leaf") {
    value["verification"] = false;
    value["remark"] = `缺少材料定额`;
  }
}
/** 计算总价格、总工时 **/
function getTotal() {
  totalPrice.value = 0;
  totalRunLaborHours.value = 0;
  const values = CalResult.value;
  if (values.length > 0) {
    formData.itemMaster = values[0].itemMaster;
    formData.Code = values[0].Code;
  }
  // todo 根据内容算出总价格、总工时
  for (let value of values) {
    totalPrice.value += value.price * value.UsageQty;
    totalRunLaborHours.value += value.RunLaborHours * value.UsageQty;
  }
}
/** BOM树筛选 */
function handleFilter(value: string, data: any) {
  if (!value) {
    return true;
  }
  return data.label.indexOf(value) !== -1;
}
/** BOM节点点击 */
async function handleNodeClick(data: { [key: string]: any }) {
  try {
    // 计算核算价格
    formData.itemMaster = data.itemMaster;
    formData.Code = data.Code;
    await calculate({ itemMaster: data.itemMaster });
  } catch (error) {
    // 错误处理
    console.error("Failed to fetch BOM tree:", error);
  }
}

/** BOM 树查询 **/
async function queryTree() {
  try {
    // if (queryParams.SupplierCode) {
    //   queryParams.SupplierCodeStr = queryParams.SupplierCode.map(
    //     (item) => `'${item}'`
    //   ).join(",");
    // }
    treeLoading.value = true;
    const response = await getBOMTree(queryParams);
    treeLoading.value = false;
    BOMOptions.value = response.data;
  } catch (error) {
    // 错误处理
    console.error("Failed to fetch BOM tree:", error);
  }
}
/** 关闭弹窗 **/
function closeDialog() {
  dialog.visible = false;
}
/** 修改BOM信息 **/
function handleSubmit() {
  formData.runLaborHours = totalRunLaborHours.value;
  formData.price = totalPrice.value;
  editBOM(formData);
  dialog.visible = false;
}

/**
 * 打开弹窗
 * @param type
 */
async function openDialog(type: string) {
  formData.PurchasedMaterialPremiumP = configData.PurchasedMaterialPremiumP;
  formData.otherFees = configData.otherFees;
  formData.InterestP = configData.InterestP;
  formData.ManufacturingCostP = configData.ManufacturingCostP;
  formData.salary = configData.salary;
  formData.electricityCostP = configData.electricityCostP;
  formData.OutputP = configData.OutputP;
  dialog.title = "计算参数";
  dialog.visible = true;
  dialog.type = type;
}

/** 关闭弹窗 **/
function closeConfigDialog() {
  configDialog.visible = false;
}
/** 修改BOM信息 **/
function handleConfigSubmit() {
  updateConfig("bomConfig", configData);
  configDialog.visible = false;
}

/**
 * 打开弹窗
 * @param type
 */
async function openConfigDialog(type: string) {
  await getConfig("bomConfig").then((res) => {
    if (res.data) {
      Object.assign(configData, res.data);
    }
  });
  configDialog.title = "计算参数";
  configDialog.visible = true;
  configDialog.type = type;
}

/**
 * 打开配置弹窗
 *
 */
async function openExportItemsDialog(type: string) {}

/** 行点击事件 **/
function handleRowClick(row: any, column: any, event: any) {
  // editDialog.visible = true;
  // console.log("行数据:", row);
  // console.log("点击列:", column);
  // console.log("事件:", event);
}
/**  导出Excel **/
async function handleExcel() {
  let values: any[] = [];
  CalResult.value.forEach((item) => {
    values.push({
      物料名称: item.name,
      物料编码: item.Code,
      用量: item.UsageQty,
      价格: item.price,
      工时: item.RunLaborHours,
      材料定额: item.IFA,
      验证结果: item.remark,
      材料定额类型: item.IFAMsg,
      供应商编码: item.SupplierCode,
      规格: item.SPECS,
      层级: item.ExpandLevel,
      组织: item.org,
      验证状态: item.verification,
    });
  });
  const data = XLSX.utils.json_to_sheet(values); //此处tableData.value为表格的数据
  // todo 批量修改key值
  const form = [];
  form.push({
    物料编码: formData.Code,
    电费率: formData.electricityCostP,
    工时费用: formData.salary,
    采购保险费率: formData.PurchasedMaterialPremiumP,
    制造费率: formData.ManufacturingCostP,
    财务费率: formData.InterestP,
    产值估算率: formData.OutputP,
    人工工资: formData.totalSalary,
    机械部分总成本: formData.TotalMechanicalCost,
    外购材料: formData.PurchasedMaterialCost,
    采购保险费: formData.PurchasedMaterialPremium,
    制造费: formData.ManufacturingCost,
    电费: formData.electricityCost,
    财务利息: formData.interest,
    管理费用: formData.ManageCost,
    合计: formData.totalPrice,
  });
  const data1 = XLSX.utils.json_to_sheet(form);
  const wb = XLSX.utils.book_new();
  XLSX.utils.book_append_sheet(wb, data, "物料信息"); //test-data为自定义的sheet表名
  XLSX.utils.book_append_sheet(wb, data1, "预测结果");
  XLSX.writeFile(wb, "成本预测(" + formData.Code + ").xlsx"); //test.xlsx为自定义的文件名
}

/** 存档 **/
async function handleAddCache() {
  await addCache(
    { key: queryParams.org + "-" + queryParams.code },
    {
      BOMOptions: BOMOptions.value,
      queryParams: queryParams,
      CalResult: CalResult.value,
      formData: formData,
    }
  );
}
/** 清除缓存并删除内容 **/
async function handleReset() {
  // todo 价格loading
  await rmCache(queryParams);
  await handleQuery();
}

const dictDataDialog = reactive({
  title: "",
  visible: false,
});

const selectedDictType = reactive({ typeCode: "", typeName: "" }); // 当前选中的字典类型

/** 打开字典数据弹窗 */
function openDictDialog(code, name) {
  dictDataDialog.visible = true;
  dictDataDialog.title = "【" + name + "】字典数据";

  selectedDictType.typeCode = code;
  selectedDictType.typeName = name;
}

/**  关闭字典数据弹窗 */
function closeDictDialog() {
  dictDataDialog.visible = false;
}

function handleIFAErr() {
  IFAErrRef.value.handleQuery();
  IFAErrRef.value.openDialog("出错物料");
}

function handleAllBudget() {
  // AllBudgetRef.value.handleQuery();
  AllBudgetRef.value.openDialog("全面预算");
}
</script>

<style lang="scss" scoped></style>
